package com.pn.taikao.service;

import com.pn.taikao.entity.User;

import java.util.List;

public interface UserService {
    Long createUser(User user);

    void updateUser(User user);

    void deleteUser(Long id);

    User getById(Long id);

    User getByUsername(String username);

    User getByEmail(String email);

    List<User> list(String username, String roleType, int page, int size);

    long count(String username, String roleType);

    // 注册：带唯一性校验
    Long register(User user);

    // 登录校验：用户名或邮箱 + 明文密码
    User authenticate(String usernameOrEmail, String rawPassword);
}


